package homework.clazz.data3;

public class Calculator {
    public  double calculateAverage(int[] numbers) {
        int sum = 0;
        for (int i = 0; i < numbers.length; i++)
            sum += numbers[i];
        return sum / (double) numbers.length;
    }

    public  int findMaximum(int[] numbers) {
        int max = numbers[0];
        for (int i = 0; i < numbers.length; i++)
            if (numbers[i] > max)
                max = numbers[i];
        return max;
    }
}